<template>
<div>
	<x-header>待办事项 <router-link to="/" slot="right"> <a class="fa fa-home fa-15x"></a> </router-link></x-header>
	<div>
		<ab-scroller url="/bpm/my/todoTaskList?supportMobile$V=true" noDataText="没有更多移动端可办理的任务了" :conditions="conditions">
			<div slot-scope="slotScope">
				<cell v-for="task in slotScope.rows" :key="task.id" :value="formatDate(task.createTime)" :title="task.name"  :link="{path:'/bpm/complateTask',query:{taskId: task.id}}" :inline-desc="task.subject"></cell>
			</div>
		</ab-scroller>
	</div>
</div>
</template>

<script>

import Vue from 'vue';

export default {
	data: function () {
	  return {
		  tasks:[],
		  conditions:[{key:"subject_^VLK",value:"流程标题"},{key:"task.name_^VLK",value:"任务名称"}]
	  }
	},
	created : function(){
	},
	methods: {	   
		formatDate:function(day){
			if(!day)return ;
			var now = new Date(day); 
			return now.format("yyyy-MM-dd"); 
			 
		}
	}
}
</script>
